module.exports = app => {
    const { STRING, INTEGER, TEXT, DOUBLE, DATE } = app.Sequelize;
    const Content = app.model.define('routers', {
        id: { type: INTEGER, primaryKey: true, autoIncrement: true },
        pid: {
            type: INTEGER,
            defaultValue: 0,
        },
        uid: INTEGER,
        title: STRING,
        path: STRING,
        redirect: STRING,
        keepAlive: {
            type: DOUBLE,
            defaultValue: false,
        },
        target: STRING,
        icon: STRING,
        template: STRING,
        self_state: {
            type: INTEGER,
            defaultValue: 1,
            comment: "1正常 0 删除 "

        },
        sort: {
            type: INTEGER,
            defaultValue: 0,
        },
        created_at: DATE,
        updated_at: DATE,
    });
    return Content;
};